Apparatus for testing a PLA by measuring a current consumed by the PLO when activated with known codes

ABSTRACT

A test circuit for testing a programmable array of a microprocessor including an instruction register for receiving an instruction signal from a data bus in response to a control signal and for outputting the received instruction signal to output lines, and a programmable logic array having a plurality of NAND circuits each forming a conductive path between first and second terminals when a predetermined instruction signal is received thereby from the register. Each of the NAND circuits includes a first terminal, a second terminal and a plurality of MOSFETs each having a first, a second and a gate electrode with the gate electrode coupled to an output line of the instruction register, and with the first and second electrodes being connected in series between the respective first and second terminals. A first precharge circuit is coupled to the first terminal of the NAND circuits, to a test terminal for providing a test signal and to a precharge terminal for providing a precharge signal, with this first precharge circuit supplying a first potential level to the first terminal of the NAND circuits in response to either the precharge signal or the test signal. A second precharge circuit is coupled to the second terminal of the NAND circuits, to the precharge terminal and to a power supply terminal for supplying a second potential level, with the second precharge circuit supplying the second potential level to the second terminal of the NAND circuits in response to the precharge signal. The current flowing through the power supply terminal, and thus through a conductive NAND circuit or circuits when the first and second potential levels are present, can then be measured to test the array.

This is a division of application Ser. No. 07/415,275 filed Sept. 22, 1989, now U.S. Pat. No. 5,101,483 which was originally filed as PCT/JP89/00065 of Jan. 25, 1989.

TECHNICAL FIELD

The present invention relates to a microcomputer including a programmable logic array therein (hereinafter referred to as MC) and a method of testing the same.

BACKGROUND OF THE INVENTION

As illustrated in FIG. 1, a conventional MC includes a data bus, an instruction register IR, a programmable logic array PLA, a data register D, a stack pointer SP, accumlators A and B, temporary registers TRB and TRC, a programmable counter PC, a ROM, and a RAM.

The program counter specifies instructions stored in the ROM, the instructions being sequentially transmitted to the instruction register IR via the data bus.

The PLA includes control output lines connected to internal registers and memories, etc., decodes instruction data transmitted from the IR, and delivers control signals such as an EM (enable memory) signal, a WACC (write accumulator) signal, an EROM (enable read only memory) signal, and a WM (write memory) signal. Those control signals are to switch on and off the internal registers and the memories, and transfer the data stored in the RAM, accumulator, and ROM, etc., onto the data bus or write the data on the data bus in the RAM and accumulator, etc.

The ROM stores instruction codes constituting instructions shown in FIG. 2a and FIG. 2b for exmaple. An instruction "ADD A, #N", which is represented by an instruction code "1010, 1010" or "A, A", means that the contents stored in the accumulator A are added with #N, that is, the contents of the second byte, and then, a result of the addition is stored into the accumulator. An instruction "ADD A, M", which is represented by an instruction code "0110, 0101" or "6, 5", means that the contents stored in the accumulator A are added with the contents stored in the RAM, and then a result of the addition is stored into the accumulator.

The PLA 200 includes, as illustrated in FIG. 3a for example, a plurality of NAND decoders 1, precharge circuits 2, 3, and a sense amplifier 18. The NAND decoder 1 comprises enhancement FETs indicated by circles (0) as illustrated in FIG. 3b and depletion FETs indicated by crosses (x) as illustrated in FIG. 3c. The precharge FET 2 has its one terminal connected to one terminal of the NAND decoder 1 and its other terminal connected to ground. The precharge FET 3 has its one terminal connected to the other terminal of the NAND decoder 1 and its other terminal connected to a power supply V_(DD). Those precharge FETs 2, 3 further have their gates connected to precharge signal lines PRC, respectively.

In the following, operation of the PLA circuit shown in FIGS. 3a-3c will be described with reference to timing charts shown in FIGS. 6(a), (b). In a time interval T1 of a timing cycle in an interval M1 of a machine cycle, the control signal EROM opens the output gate of the ROM to fetch out the instruction code stored in the ROM onto the bus and the control signal WIR opens the input gate of the instruction register 30 to store the instruction code on the bus in the instruction register 100. When the instruction code fetched out from the instruction register IR 100 is "A, A", the NAND decoders 1 on decode lines L'1, L'3 become conductive in a machine cycle interval M2 to permit the sense amplifier 18 to input a signal "H" into the AND gate 6. Therefore, in a timing cycle interval T3 the control output signal EACC is generated on a control output signal line 4 via the AND gates 6, and in a timing cycle interval T4 the control output signal WACC is generated. Additionally, when the instruction code is "6, 5", the NAND decoders 1 located on decode lines L'2, L'4 become conductive in a machine cycle interval M2 to permit the sense amplifier 18 to input a signal "H" into the AND gate 6. Therefore, in the timing cycle interval T3 the control output signal ACC is generated on the control output signal line 4, and in a timing cycle interval T4 the control output signal WACC is generated. Here, the control signals such as EROM, WIR, PCUP, and the like illustrated in FIG. 1 are issued from a timing control circuit T/C.

Such a conventional PLA circuit however, has a problem that all instruction codes for an instruction must be decoded to generate the control signals necessary for the execution of the instruction. One instruction code generally requires four decode lines on the average, for example the instruction "A, A" requires the decode lines L'1, L'3, the instruction "6, 5" requires the decode lines L'2, L'4, L'5, . . . . That is, about 100 instructions require about 400 decode lines in all. If the width of a single decode line of the PLA circuit which is formed on a semiconductor chip is assumed to be 10 μm upon integrating the PLA, the PLA has its entire width ranging from 4 to 7 mm and hence occupies a wide areas of the semiconductor chip, therefore requiring that the chip be large.

Such a PLA incorporated, in the MC must be tested to determine whether or not it is operates in a proper manner. Such a test is carried out two or three times during the last stage of the manufacture of semiconductors or during a process of packaging the semiconductors. A typical MC includes about 100 to 200 output lines 4 for the control signals issued from the PLA. However, those control signal output lines 4 are connected to input/output gates of various of registers included in the MC but are not connected to external output terminals. This does not allow a direct check on that any control signal is issued from the PLA. Accordingly, to test the existence of any short-circuit in the wiring in the PLA and that of any abnormal FET in the same, a MC program stored in the ROM is first executed in succession for every instruction. Then, contents in each register which is the object of an instruction, and contents in all registers other than that which is the object of each instruction are read out each time for their checks. It is thereby checked that decoding and execution control of the instructions are carried out correctly, and tested indirectly that the PLA is normal. When for example an instruction "MOV A, B" is given from the outside to the MC and executed, a check of the contents stored in an accumulator (ACC) and a temporary register B (TRB) is performed to confirm that the contents stored in the TRB have been moved into the ACC, and to check that there is no change in the contents stored in other registers and the like after fetching out those contents to the outside followed by execution of the instruction "MOV A, B". However, the aforementioned operation to test the PLA requires, a data check concerning internal circuits amounting to 1000 to 100000 steps using the tester, which substantially makes it impossible to achieve the complete test. In addition, since the tester must usually be employed for varieties of test excepting the aforementioned object, use of such an expensive tester over a long period of time makes uneconomical the associated device. Furthermore, a program for such a test is very complicated, requiring much labor for preparation thereof.

In view of the drawback of the prior art, it is an object of the present invention to reduce the absolute number of decode lines while retaining their same functions as in the prior art. It is another object of the invention to provide a test of short duration of whether or not all of the wiring in the programmable logic array circuit is operationally normal.

SUMMARY OF THE INVENTION

A microcomputer includes in general varieties of instructions amounting in total of about one hundred, some of which have a very similar format. For example, the foregoing instructions "ADD A, #N" and "ADD A, M" are the same instruction of addition, and are different only in that the former allows data to be fetched from "#N" or the second byte thereof or the buffer from a memory designated at "M". Such similar instructions have almost common formats of control line signals and timing of the same.

A microcomputer in accordance with the first embodiment of the invention comprises, in view of a feature of those similar instructions being common in operation timing, a memory for storing a first instruction including a first byte and a second instruction including a first byte and a second byte having the same code as that of the first byte of the first instruction, an instruction register and means for loading the second byte of the second instruction to the instruction register after decoding the first byte of the second instruction.

In accordance with the second embodiment of the invention, there is provided a test circuit for testing a microcomputer which has a programmable logic array, said programmable logic array comprising:

(a) a NAND type decoder having (i) inputs for receiving an instruction code and a timing signal, (ii) a control signal output line, and (iii) a plurality of MOSFETs serially connected;

(b) a first precharge MOSFET connected between one end of the output line of the decoder and the ground; and

(c) a second precharge MOSFET connected between the other end of the output line of the decoder and a power supply; the improvement wherein the test circuit further has means for making the first precharging MOSFET conductive during testing the programmable logic array.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a circuit block diagram illustrating a typical microcomputer (MC);

FIGS. 2a and 2b are views illustrating formats of conventional instruction code;

FIG. 3a is a circuit block diagram illustrating a conventional programmable logic array;

FIG. 3b is a detail showing the enhancement FET which comprises a cross-point marked with an (o) in the NAND decoder of FIG. 3a;

FIG. 3c is a detail showing the depletion FET which comprises a cross-point marked with an (x) in the NAND decoder of FIG. 3a;

FIG. 4 is a circuit block diagram illustrating a programmable logic array (PLA) of an embodiment according to the present invention;

FIGS. 5a and 5b are views illustrating formats of instruction codes in the embodiment of FIG. 4;

FIGS. 6a and 6b are timing charts illustrating the operation of the embodiment of FIG. 4;

FIG. 7 is a logic circuit diagram illustrating a sense amplifier for use in the present invention;

FIG. 8 is a logic circuit diagram illustrating a delay circuit for use in the present invention;

FIG. 9 is a circuit diagram illustrating a PLA test circuit of the embodiment according to the present invention;

FIG. 10 is a logic circuit diagram illustrating an OR gate for use in the present invention;

FIG. 11 is a timing chart illustrating a test on the PLA of the embodiment according to the present invention; and

FIG. 12 is a circuit diagram illustrating a PLA test circuit of another embodiment according to the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

In the following, a first embodiment of the invention will be described with reference to FIGS. 4 through 8.

FIG. 5a and 5b illustrate addition instructions "ADD A, #N" and "ADD A, M", the latter being analogous to the former, addition instruction "ADD, A, M" previously described in relation to the prior art. The former addition instruction "ADD A, #N" is not different from the conventional instruction code illustrated in FIG. 2a and 2b. Against this, a first byte code 11 of a certain addition instruction "ADD A, M" is not different from the conventional one, but a second byte code 12 of the same possesses the same code as the first byte code 13 of the analogous addition instruction "ADD A, #N".

As illustrated in FIG. 4, which exhibits a circuit for a PLA of the embodiment according to the first invention, a decode line L1 is a NAND decoder for a code "6, 5", that is, the addition instruction "Add A, M", which is operated in a machine cycle interval M1. Namely, when the first byte instruction code "6, 5" of the instruction "ADD A, M" is entered into an instruction register 100, the decode line L1 is activated (i.e., to a "L" level) to permit a "H" level signal (load signal) to be entered into a delay circuit 17 via a sense amplifier 18. Here, the sense amplifier 18 and the delay circuit 17 are arranged as illustrated in FIGS. 7 and 8. The delay circuit 17 issues a control signal WIR to open the instruction register IR in the next timing cycle interval M2, T1 under the control of gates 14, 15, 16, for thereby loading the instruction register IR with a second byte code "A, A" from a bus. Simultaneously, a control line signal WTRB is prohibited from being generated. When the decode line L1 decodes the first byte of the instruction as described above, the delay circuit 17, and the gates 14, 15, 16 load the instruction register IR with the second byte of that instruction. A decode line L4 corresponds to the decode line L5 shown in the circuit diagram of the conventional PLA of FIG. 3a. It therefore issues a control signal EM in a timing cycle interval M1, T4. Decode lines L2, L3, which correspond to L'1, L'3 involved in the conventional PLA circuit of FIG. 3a, and respectively, issue a control signal EACC in a timing cycle interval M2, T3 and a control signal WACC in a timing cycle interval M2, T4.

Thus the PLA of the embodiment according to the first invention illustrated in FIG. 4 can exhibit the operation timing of control signals illustrated in FIG. 6, does the coventional PLA shown in FIG. 3a. It should here be understood from a comparison of the decode lines in the PLA of FIGS. 3a and 4 that the conventional decode lines L'2 and L'4 are not required and L1 is nonexistent in the conventional case.

Decode lines for control signals WTRC and FADD can also be reduced, although not illustrated in the PLA circuit diagram of FIG. 4.

The MC includes substantially about 16 groups of analogous instructions such as ADD, ADC, SUB, SBB, OR, AND, EOR, INC, DEC, CMP, CPL, RRC, RLC, SRC, SLC, and the like. In a typical MC operational with about 8 bits, 5 decode lines on the average can be reduced among analogous instructions and about 80 decode lines as a whole can be reduced.

Although in the above description the first and second byte instruction codes were shown as being commmon as an illustrative example, a combination of the second and third bytes may also be possible or with a replacement thereof for the machine cycles a combination of second and third machine cycles may be possible, as a matter of course.

In succession, an embodiment of a test circuit for a microcomputer according to the second embodiment will be described with reference to FIGS. 9, 10, and 11. Here, the like symbols shall be applied to the like constituent elements as those of the conventional one and the first invention, and the description thereof will here be omitted. Namely, a PLA circuit which includes in itself a NAND decoder 1, precharge FETs 2, 3, and a sense amplifier, etc., is constructed as in the first embodiment. In the circuit diagram of a PLA test circuit of an embodiment according to the second invention illustrated in FIG. 9, an OR gate 21 has its input connected to a test terminal 22 and a PRC (precharge) signal line and has its output connected to a gate of a precharge FET 2. The precharge FET2, which is of an enhancement type as described previously, grounds the NAND decoder 1 at all times when the test terminal 22 is "H" at its input together with the conventional PRC input being "H", or when a test is executed. On the contrary, an external power supply 25 is connected via an external ammeter 24 to a VDD terminal 23 disposed on a semiconductor chip. The VDD terminal 23 is connected to one end of a precharge FET 3 whose other end is connected to the output of the NAND decoder 1. In the present embodiment, the ammeter 24 is a current measuring unit in a general-purpose tester, and the DC power supply 25 is a +5V one included in the same tester.

FIG. 11 is a timing chart illustrating a test operation for the PLA in the MC in the embodiment according to the second invention. In what follows, operation of the just mentioned test operation will be described with reference to FIG. 11 and to the circuit diagram of FIG. 9.

In a test interval for the PLA, the test terminal 22 is kept at a "H" level. Hereby, the precharge FET 2 becomes conductive to permit the NAND decoder 1 to be grounded at its one end at all times. In succession, in the timing T1, an instruction is entered. For example, when an instruction "MOV A, B" is entered, the NAND decoder 1 for an instruction code corresponding to that instruction becomes conductive. In the timing T1, the precharge signal (PRC) is at a "H" level, and the PRC becomes a "L" level. Hereby, the precharge FET 3 becomes conductive because of its being of a P channel type, and in the timing T1 a current IDD from the power supply 25 flows through a current route: precharge FET 3, NAND decoder 1, and precharge FET 2 because all those elements become conductive thereupon, allowing a current corresponding to the single NAND decoder or that corresponding to the single control signal to be read by the ammeter 24.

Such a conduction current through the single NAND decoder is approximately 50 μA when the MC is constructed with CMOS semiconductors. Consequently, if a current of that degree is detected, then it can be estimated that one control signal has been activated. In addition, although in the above situation a current flowed in the timing T1 corresponding to one control signal, the reason is that since the timing lies during the time when an instruction is entered, only that instruction is selected. Then, when the PRC becomes a "L" level in the timing T2, the PRC becomes a "H" level and the precharge FET 3 is switched off. Hereby, no power supply current IDD flows.

It is now assumed that two control outputs are activated to a "H" level in a timing T3 for execution of the instruction "MOV A, B". Hereupon, two NAND decoders 1 have been conductive unless there is any short-circuit through wirings or any disconnection therealong. In this situation, the PRC changes to a "H" level in the timing T3, a conduction current flows through the precharge FET 3 because the NAND decoder 1 and the precharge FET 3 have already been conductive. Since thereupon the two NAND decoders have been conductive, there flows approximately 100 μA of the power supply current IDD corresponding to the two control singals.

In succession, it is assumed on the design that the four control signal outputs have been at an active "A" level in the timing T4. Since in this situation, the four NAND decoders are conductive as in the timing T3, there flows the power supply current corresponding to the four control signal outputs. It is thus possible to measure the number of the control signal outputs by measuring the power supply current in each timing. Accordingly, a complete test can be achieved for all NAND decoders. If there is any trouble such as disconnection or short-circuit of wirings or bad transitors, or the like in the PLA in the manufacture of semiconductors of the MC, then the measured number of NAND decoders made conductive is not equal to that of NAND decoders made conductive according to the design in each timing, allowing a bad PLA to be immediately detected by a tester program.

The PLA of a MC generally includes about 100-500 NAND decoders requiring the steps for its test to be about 400 through 2000 even when the test is assumed to be done in respective timings of T1 and T2. This corresponds to a very short time.

A PLA circuit of another embodiment according to the second invention illustrated in FIG. 12 is the same in its principle of operation as that of the first embodiment illustrated in FIG. 9. Namely, a precharge FET 2 is made conductive to establish a DC path through a NAND decoder 1. In this situation, if there is any signal to be decoded corresponding to an input from an instruction register 100, a T timing input, and a M timing input, then a DC current flows from a power supply VDD via a precharge FET 3. The current is compared with the number of decoded signals for determination of the quality of the measurement.

Although in the present specification the PLA of the MC was described, the present invention is applicable also for a PLA of a microprocessor.

INDUSTRIAL APPLICABILITY

According to the MC of the first invention, as described above, the number of decode lines can be reduced by employing analogous instruction codes as being common. That is, since the second byte of a certain instruction set among analogous instruction sets can intactly utilize a control signal output of the first byte of the certain instruction set being an analogous instruction of that instruction. Accordingly, if there is a decode line only for the first byte of the certain instruction set, then the intact use of that decode line in the analogus instruction enables the analogus instruction to be executed. Thus, the first invention, which employs a certain decode line for other decode lines, can reduce the occupation area of those decode lines on the chip compared with the prior MCs, which include for a different instruction code a corresponding decode line. To be concrete, 400 through 600 decode lines can be reduced by about 80 ones, and the area occupied by the PLA on the whole semiconductor chip area can be reduced by 10 to 20%. The first invention can thus reduce the chip area greatly, keeping the same function of the device as in the conventional PLA circuit, and assuring very high industrial applicability.

Additionally, according to the PLA test circuit of the second invention, the number of the conducted NAND decoders is measured on the basis of the power supply current IDD in the part of the PLA of the MC. Accordingly, the power supply current IDD may be measured only for all timings of the instruction sets possessed by the MC. This simplifies a data check, which in the conventional case amounts to 10000 through 100000 steps, to about 2000 steps. Furthermore, according to the second invention, a direct test of the circuit part of the PLA can be achieved without requiring a check on data stored in registers, etc., which can be checked externally of the MC. Thus, greater shortening of the time required for a test and sharp reduction of the step number for preparation of a test program can be realized, assuring very high industrial applicability. 

I claim:
 1. A test circuit for testing a microprocessor having a data bus comprising:an instruction register connected to the data bus and having a control input and a plurality of output lines, said instruction register receiving an instruction signal from the data bus in response to a control signal received by the control input and outputting the received instruction signal to said output lines; a programmable logic array having a plurality of NAND circuits each forming a conductive path between first and second terminals when a predetermined instruction signal is received thereby, each of said NAND circuits including a said first terminal, a said second terminal and a plurality of MOSFETs each having a first electrode, a second electrode and a gate electrode coupled to an ouput line of said instruction register, and with the MOSFETs being connected in series by the first and second electrodes between the respective said first and second terminals; a test terminal for providing a test signal; a precharge terminal for providing a precharge signal; a first precharge circuit coupled to said first terminals of said NAND circuits, to said test terminal and to said precharge terminal, said first precharge circuit supplying a first potential level to said first terminal of said NAND circuits in response to either the precharge signal or the test signal; a power supply terminal for supply a second potential level; and a second precharge circuit coupled to said second terminals of said NAND circuit, to said precharge terminal and to said power supply terminal, said second precharge circuit supplying the second potential level to said second terminal of said NAND circuits in response to the precharge signal, whereby the NAND circuits are independently tested by knowing the instruction signal that activate the NAND circuits and by measuring a current drain of the activated NAND circuits.
 2. A test circuit according to claim 1, wherein the first potential level is a ground level and the second potential level is a power supply voltage level.
 3. A test circuit according to claim 2, further comprising means for measuring a current drain at said power supply terminal.
 4. A test circuit according to claim 1, wherein said first precharge circuit includes a plurality of MOSFETs each having a first electrode coupled to said first terminal of a respective said NAND circuit, a second electrode coupled to a node applied to the first potential level, and a gate electrode coupled to said precharge terminal and to said test terminal.
 5. A test circuit according to claim 4, further comprising a gate circuit having a first input terminal coupled to said precharge trminal, a second input terminal coupled to said test terminal and an output terminal coupled to said gate electrode of said MOSFET of each of said first precharge circuits.
 6. A test circuit according to claim 5, wherein said gate circuit is an OR gate circuit.
 7. A test circuit according to calim 1, wherein said second precharge circuit includes a plurality of MOSFETs each having a first electrode coupled to said second terminal of a respective said NAND circuit, a second electrode coupled to said power supply terminal and a gate electrode coupled to said precharge terminal.
 8. A test circuit according to claim 7, further comprising an ammeter connected between said power supply terminal and a power supply.
 9. A test circuit according to claim 10, further comprising:a plurality of sense amplifiers each having an input coupled to the second terminal of a respective said NAND circuit and an ouput, each of said sense amplifiers outputting a sensed signal to the output thereof; and a control signal generating circuit connected between the output of one of said sense amplifiers and said control input of sid instruction register, said control signal generating circuit receiving the sensed signal output from said one of said sense amplifiers and an instruction register writing signal, and generating the control signal for said instruction register from the received signals.
 10. A test circuit for testing a microprocessor having a data bus, the microprocessor operated in a plurality of machine cycles, the test circuit comprising:an instruction register coupled to the data bus and having a plurality of output lines, said instruction register receiving an instruction signal from said data bus and outputting the received instruction signal to said output lines; a plurality of first lines supplying timing signals which represent the machine cycle; a programmable logic array having a plurality of first NAND circuits and second NAND circuits, each of the NAND circuits including a first terminal, a second terminal and a plurality of MOSFETs each having a first electrode, a second electrode and a gate electrode, with the MOSFETs being interconnected in series by the first and second electrodes between the respective first and second terminals, said gate electrodes of said MOSFETs of said first NAND circuits being coupled to said output lines of said instruction register, said gate electrodes of said MOSFETs of said second NAND circuits being coupled to said first lines, said second terminal of each of said first NAND circuits being coupled to a said first terminal of a said second NAND circuit to form an electric path between said first terminal of the respective said first NAND circuit and said second terminal of the respective associated said second NAND circuit when the respective said first NAND circuit receives a predetermined instruction signal and the respective associated said second NAND circuit receives a predetermined timing signal; a test terminal for providing a test signal; a precharge terminal for providing a precharge signal; a first precharge circuit coupled to said first terminal of said first NAND circuits, to said test terminal and to said precharge terminal, said first precharge circuit supplying a first potential level to said first terminals of said first NAND circuits in response to either the precharge signal or the test signal; a power supply terminal for supplying a second potential level; and a second precharge circuit coupled to said second terminals of said second NAND circuits, to said precharge terminal and to said power supply terminal, said second precharge circuit supplying a second potential level to said second terminal of said second NAND circuits in response to the precharge signal, whereby the NAND circuits are independently tested by knowing the instruction signals that activate the NAND circuits and by measuring a current drain of the activated NAND circuits.
 11. A test circuit according to claim 10, wherein the first potential level is a ground level and the second potential level is a power supply voltage level.
 12. A test circuit according to claim 11, further comprising means for measuring a current drain at said power supply terminal.
 13. A test circuit according to claim 10, wherein: said first precharge circuit includes a plurality of MOSFETs with each MOSFET having a first electrode coupled to said first terminal of a respective said first NAND circuit, a second electrode coupled to a node applied to the first potential level, and a gate electrode coupled to said test terminal and to said precharge terminal; and said second precharge circuit includes a plurality of MOSFETs with each said MOFET having a first electrode coupled to said second terminal of at least one said second NAND circuit, a second electrode coupled to said power supply terminal, and a gate elecrode coupled to said precharge terminal.
 14. A test circuit according to claim 13, further comprising an ammeter connected between said power supply terminal and a power supply for said second potential.
 15. A test circuit according to claim 10, wherein: said first NAND circuits include a plurality of groups of said first NAND circuits; said second terminals of said first NAND circuits of the same said group are coupled to said first terminal of a common one of said NAND circuits; and said second terminals of a plurality of said second NAND circuits are coupled together. 